package com.example.demo.controller.experycontroller;

import com.example.demo.common.Result;
import com.example.demo.service.ChildService;
import com.example.demo.vo.ChildProfileVO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/expert/child")
@RequiredArgsConstructor
public class ExpertChildController {
    private final ChildService childService;

    @GetMapping("info/{childId}")
    public Result<ChildProfileVO> getChildProfile(@PathVariable Long childId) {
        return Result.success(childService.getChildProfile(childId));
    }


}
